//
//  TopCollectionViewCell.m
//  MarianasTrench
//
//  Created by wangjue on 16/3/17.
//  Copyright © 2016年 王爵. All rights reserved.
//

#import "TopCollectionViewCell.h"

@interface TopCollectionViewCell ()


@end

@implementation TopCollectionViewCell

-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self createSubViews];
    }
    return self;
}



-(void)createSubViews{
    self.label = [[UILabel alloc] init];
    [self.contentView addSubview:_label];
    
    
}


-(void)setNameStr:(NSString *)nameStr{
    _nameStr = nameStr;
    
    _label.text = _nameStr;
}

-(void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes{
    _label.frame = CGRectMake(0, 0, self.contentView.frame.size.width, 20);
    _label.textAlignment = NSTextAlignmentCenter;
}


@end
